// 实例高德图层
var gaode_vec = new ol.layer.Tile({
    title: "高德地图",
    source: new ol.source.XYZ({
        url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}',
        wrapX: false,
        crossOrigin: "Anonymous"
    })
});
//初始化 高德影像数据
var gaode_img = new ol.layer.Tile({
    title: '高德地图',
    source: new ol.source.XYZ({
        url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=6',
        wrapX: false,
        crossOrigin: 'Anonymous',
    }),
})
// 高德:路网+标注
var gaode_cia = new ol.layer.Tile({
    title: '高德地图',
    source: new ol.source.XYZ({
        url: 'http://webst0{1-4}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}',
        wrapX: false,
        crossOrigin: 'Anonymous',
    }),
})
var imgLayergroup = new ol.layer.Group({
    layers: [gaode_img, gaode_cia],
    visible: false,
})
// ------------------------------------------------------天地图------------------------------------------------------------
// 我的天地图密匙_冯庆贺
var tdtKey = 'aa3f981f0c4aa11bbbe5bde80a535c82'
//初始化天地图矢量图层
var tiandi_vec = new ol.layer.Tile({
    title: "天地图矢量图层",
    source: new ol.source.XYZ({
        url: "http://t{0-7}.tianditu.gov.cn/DataServer?T=vec_c&x={x}&y={y}&l={z}&tk=" + tdtKey,
        crossOrigin: "anonymous",
        projection: "EPSG:4326",
        wrapX: false
    })
});
//初始化天地图矢量注记图层
var tiandi_cva = new ol.layer.Tile({
    title: "天地图矢量注记图层",
    source: new ol.source.XYZ({
        url: "http://t{0-7}.tianditu.gov.cn/DataServer?T=cva_c&x={x}&y={y}&l={z}&tk=" + tdtKey,
        crossOrigin: "anonymous",
        projection: "EPSG:4326",
        wrapX: false
    })
});
//初始化天地图影像图层
var tiandi_img = new ol.layer.Tile({
    title: "天地图影像图层",
    source: new ol.source.XYZ({
        url: "http://t{0-7}.tianditu.gov.cn/DataServer?T=img_c&x={x}&y={y}&l={z}&tk=" + tdtKey,
        crossOrigin: "anonymous",
        projection: "EPSG:4326",
        wrapX: false
    })
});
//初始化天地图影像注记图层
var tiandi_cia = new ol.layer.Tile({
    title: "天地图影像注记图层",
    source: new ol.source.XYZ({
        url: "http://t{0-7}.tianditu.gov.cn/DataServer?T=cia_c&x={x}&y={y}&l={z}&tk=" + tdtKey,
        crossOrigin: "anonymous",
        projection: "EPSG:4326",
        wrapX: false
    })
});
// 影像+注记图层组
var tdImgLayergroup = new ol.layer.Group({
    layers: [
        tiandi_img,
        tiandi_cia
    ],
    visible: false

});
// 矢量+注记图层组
var tdVecLayergroup = new ol.layer.Group({
    layers: [
        tiandi_vec,
        tiandi_cva
    ]
});
var docName = 'guanggu'; //doc文档名称
var docLayer = new Zondy.Map.Doc('', docName, {
    ip: 'localhost',
    port: 6163,
    crossOrigin: 'anonymous', //设置允许跨域下载图片
});